<?php
namespace App\Libs\Helper;
class PasswordHelper
{
    public static function encrypt($password, $salt = NULL) {
        if (empty($salt)) {
            $salt = substr(md5(microtime() . mt_rand(0, 1000)), 2, 5);
        }
        $password = md5(md5($password) . $salt);
        return array($salt, $password);
    }
}
